<div id="board-options">
    <span id="board-name">
        {{board.name}}
    </span>

    <div class="board-operation-menu dropdown" uib-tooltip="看板设置" tooltip-placement="right"
         tooltip-trigger="mouseenter">
        <button class="dropdown-toggle dropdown" type="button" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="true">
            <span class="thiki-setting glyphicon glyphicon-cog"></span>
        </button>
        <ul class="thiki-banner-menu thiki-menu-items dropdown-menu">
            <li class="thiki-menu-item" ng-click="openProjectsDialog()">
                <a><span class="thiki-menu-ico stage-ico glyphicon glyphicon-th-large"></span> 所属项目</a></li>
            <li class="thiki-menu-item" ng-click="openBoardTags()">
                <a>
                    <span class="thiki-menu-ico stage-ico glyphicon glyphicon-tags"></span> 标签</a>
            </li>
            <li class="thiki-menu-item" ng-click="openBoardConfiguration()"><a><span
                    class="thiki-menu-ico stage-ico glyphicon glyphicon-cog"></span> 配置</a></li>
            <li class="thiki-menu-item" ng-click="openSprintDialog()"><a><span
                    class="thiki-menu-ico stage-ico glyphicon glyphicon-plane"></span> 迭代设置</a></li>
            <li class="thiki-menu-item" ng-click="openSprintCompetitionDialog()" ng-show="sprint!==undefined">
                <a><span
                        class="thiki-menu-ico stage-ico glyphicon glyphicon-ok-sign"></span> 完成迭代</a>
            </li>
            <li role="separator" class="divider"></li>
            <li class="thiki-menu-item thiki-delete-item"><a ng-click="openBoardDelete()"><span
                    class="thiki-menu-ico stage-ico glyphicon glyphicon-trash"></span> 删除</a>
            </li>
        </ul>
    </div>

    <div id="board-sprint" ng-show="sprint!==undefined">
        <div id="sprint-time-box">
            {{sprint.startTime | formatTime:'YYYY年MM月DD日'}} - {{sprint.endTime | formatTime:'YYYY年MM月DD日'}}
            {{sprint.sprintName}}
            <span class="sprint-badge sprint-badge-total-points" uib-tooltip="本次迭代故事点总数" tooltip-placement="top"
                  tooltip-trigger="mouseenter" ng-if="cardsPointsCount!==undefined">{{cardsPointsCount}}</span>
            <span class="sprint-badge sprint-badge-finished-points" uib-tooltip="本次迭代已完成故事点数" tooltip-placement="top"
                  tooltip-trigger="mouseenter"
                  ng-if="finishedCardsPointsCount!==undefined">{{finishedCardsPointsCount}}</span>
        </div>
        <div id="sprint-indicator-animation"
             tooltip-enable="sprint.remainingDays<0"
             uib-tooltip="迭代已经超期"
             tooltip-placement="left"
             tooltip-trigger="mouseenter">
            <div ng-repeat="n in [].constructor(sprint.totalDays) track by $index" max="index" value="$index"
                 animate="true" class="sprint-indicator"
                 ng-class="{'sprint-went-days':$index < sprint.wentDays,'sprint-today':$index == sprint.wentDays,'sprint-remaining-days':$index > sprint.wentDays,'sprint-expire':sprint.remainingDays<0,'sprint-small':sprint.totalDays>20}">
            </div>
        </div>
    </div>
    <div class="dropdown board-options-button board-options-button-gray board-options-button-highlight"
         uib-tooltip="创建卡片和环节"
         tooltip-placement="left" tooltip-trigger="mouseenter">
        <button class="dropdown-toggle dropdown" type="button" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="true">
            创建
        </button>
        <ul class="thiki-banner-menu thiki-menu-items dropdown-menu">
            <li class="thiki-menu-item">
                <a ng-click="openCardCreationDialog()">卡片</a>
            </li>
            <li class="thiki-menu-item">
                <a ng-click="openStageCreationDialog()">环节</a>
            </li>
        </ul>
    </div>

    <div class="board-pages-button board-options-button board-options-button-gray" uib-tooltip="分享知识、传递信息"
         tooltip-placement="left"
         tooltip-trigger="mouseenter" ng-click="openPagesDialog()">
        <span class="kanban-view-type-menu glyphicon glyphicon-book "></span> 文库
    </div>

    <div class="board-options-button board-options-button-gray ico-button" ng-click="openBurnDownChartDialog()">
        <i class="fa fa-area-chart"></i>
    </div>

    <div class="dropdown board-options-button board-options-button-gray" uib-tooltip="看板视图切换"
         tooltip-placement="left" tooltip-trigger="mouseenter">
        <button class="dropdown-toggle dropdown" type="button" data-toggle="dropdown" aria-haspopup="true"
                aria-expanded="true">
            <span class="kanban-view-type-menu glyphicon glyphicon-align-left"></span>{{typeName}}
        </button>
        <ul class="thiki-banner-menu thiki-menu-items dropdown-menu">
            <li class="thiki-menu-item" ng-click="loadStages('sprintViewSnapshot','迭代视图')"
                ng-class="{'active-view-type':activeViewType=='sprintViewSnapshot'}" uib-tooltip="本次迭代中的卡片"
                tooltip-placement="left" tooltip-trigger="mouseenter">
                <a><span class="thiki-menu-ico stage-ico glyphicon glyphicon-plane"></span> 迭代视图</a>
            </li>
            <li class="thiki-menu-item" ng-click="loadStages('archiveViewSnapshot','归档视图')"
                ng-class="{'active-view-type':activeViewType=='archiveViewSnapshot'}" uib-tooltip="已经归档的卡片"
                tooltip-placement="left" tooltip-trigger="mouseenter">
                <a><span class="thiki-menu-ico stage-ico glyphicon glyphicon-briefcase"></span> 归档视图</a>

            </li>
            <li class="thiki-menu-item" ng-click="loadStages('roadMapViewSnapshot','产品路线图')"
                ng-class="{'active-view-type':activeViewType=='roadMapViewSnapshot'}"
                uib-tooltip="未进入迭代的卡片、本次迭代中已经完成的卡片以及归档的卡片" tooltip-placement="left" tooltip-trigger="mouseenter">
                <a><span class="thiki-menu-ico stage-ico glyphicon glyphicon-road"></span> 产品路线图</a>
            </li>
            <li class="thiki-menu-item" ng-click="loadStages('fullViewSnapshot','项目全景图')"
                ng-class="{'active-view-type':activeViewType=='fullViewSnapshot'}" uib-tooltip="当前看板所有卡片"
                tooltip-placement="left" tooltip-trigger="mouseenter">
                <a><span class="thiki-menu-ico stage-ico glyphicon glyphicon-picture"></span> 项目全景图</a>
            </li>
        </ul>
    </div>
    <div ng-controller="advancedFilterController" class="cards-filter">
        <div class="board-options-button board-options-button-gray" ng-click="disPlayFilterInput()">
            <span class="kanban-view-type-menu glyphicon glyphicon-filter"></span>{{filterButtonText}}
        </div>
        <div class="board-options-button board-options-button-gray banner-filter" ng-show="isShowFilterInput">
            <div class="input-group">
                <span class="input-group-btn">
        <button class="btn btn-default" type="button"
                ng-click="openAdvancedFilter()" ng-class="{'advanced-filter-closed':!isOpenAdvance}">高级</button>
      </span>
                <input type="text" class="form-control banner-filter-input" ng-model="keyword" focus="true"
                       placeholder="卡片编号或概述" autocomplete="off" maxlength="30"/>
            </div>
            <div>
                <div ng-if="isLoadAdvancedFilter" pageslide ps-container="stages" ps-click-outside="false"
                     ps-push="true" ps-open="isOpenAdvance" ps-auto-close="false" ps-push="true" data-ng-model="board">
                    <div class="panel panel-default">
                        <div class="panel-heading">高级过滤</div>
                        <div class="panel-body">
                            <div id="advanced-groups">
                                <div class="filter-group">
                                    <div class="filter-group-name">按标签</div>
                                    <div class="filter-group-items">
                                        <div class="tag" ng-repeat="tag in tags" ng-class="tag.color">
                                            <div ng-class="tag.color" ng-click="selectTag(tag)">
                                                <span id="color.name" ng-show="tag.stick"
                                                      class="glyphicon glyphicon-ok-circle"></span>{{tag.name}}
                                            </div>
                                        </div>
                                        <div class="no-tags-tip" ng-show="tags.length==0">
                                            暂无标签。
                                        </div>
                                    </div>
                                    <div class="btn-group filter-radio-group" ng-hide="tags.length==0">
                                        <div class="radio">
                                            <label uib-tooltip="包含任意所选标签" tooltip-placement="right"
                                                   tooltip-trigger="mouseenter">
                                                <input type="radio" name="tagMatchType" value="or"
                                                       ng-change="selectTagMatchType('or')"
                                                       checked="tagMatchType==='or'" ng-model="tagMatchType">
                                                或
                                            </label>
                                            <label uib-tooltip="同时包含所选标签" tooltip-placement="right"
                                                   tooltip-trigger="mouseenter">
                                                <input type="radio" name="tagMatchType" value="and"
                                                       ng-change="selectTagMatchType('and')"
                                                       checked="tagMatchType==='and'" ng-model="tagMatchType">
                                                与
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="filter-group">
                                    <div class="filter-group-name">按认领成员</div>
                                    <div class="filter-group-items">
                                        <filter-member ng-repeat="member in members" member="member"
                                                       data-ng-model="member"></filter-member>
                                    </div>
                                    <div class="btn-group filter-radio-group" ng-hide="tags.length==0">
                                        <div class="radio">
                                            <label uib-tooltip="被所选任意成员认领" tooltip-placement="right"
                                                   tooltip-trigger="mouseenter">
                                                <input type="radio" name="memberMatchType" value="or"
                                                       ng-change="selectMemberMatchType('or')"
                                                       checked="memberMatchType==='or'" ng-model="memberMatchType">
                                                或
                                            </label>
                                            <label uib-tooltip="同时被所选成员认领" tooltip-placement="right"
                                                   tooltip-trigger="mouseenter">
                                                <input type="radio" name="memberMatchType" value="and"
                                                       ng-change="selectMemberMatchType('and')"
                                                       checked="memberMatchType==='and'" ng-model="memberMatchType">
                                                与
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="filter-group">
                                    <div class="filter-group-name">按规格</div>
                                    <div class="filter-group-items">
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.small.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.small)"
                                                 data-ng-model="size.small">
                                                S
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.medium.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.medium)"
                                                 data-ng-model="size.medium">M
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.large.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.large)"
                                                 data-ng-model="size.large">L
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.Xlarge.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.Xlarge)"
                                                 data-ng-model="size.Xlarge">XL
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.XXlarge.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.XXlarge)"
                                                 data-ng-model="size.XXlarge">XXL
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.unestimatable.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.unestimatable)"
                                                 data-ng-model="size.unestimatable">无法估算
                                            </div>
                                        </div>
                                        <div class="filter-group-item-wrap">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="size.unestimate.selected"></span>
                                            <div class="filter-size-item" ng-click="selectSize(size.unestimate)"
                                                 data-ng-model="size.unestimate">尚未估算
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="filter-group">
                                    <div class="filter-group-name">按历时时长</div>
                                    <div class="filter-group-items">
                                        <div class="filter-group-item-wrap" ng-repeat="elapsedDays in elapsedDaysList">
                                            <span class="selected-item glyphicon glyphicon-ok-sign"
                                                  ng-show="elapsedDays.selected"></span>
                                            <div class="filter-size-item" ng-click="selectElapsedDays(elapsedDays)">
                                                {{elapsedDays.name}}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
